<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="easyui-layout" fit="true">
	<div data-options="region:'center'" style="border: 0">
		<h1>
		<input type="hidden" value="${ct.id}">
		<a id="returnclass" href="#"><img class="imglog" alt="" src="public/images/back.png">&nbsp;${ct.name}(${stu.name})</a>
		<input type="hidden" value="${ct.cla[0].id}">
		</h1>
		<fieldset class="fs">
			<legend>基本信息</legend>
			<div class="left">
				<div class="exam_info"><span style="font-size: 40px;">${jds.allScore}</span></div>
				<div class="exam_info">【试卷名称】：TR09-${ct.name}</div>
				<div class="exam_info">【出卷人】： ${ct.emp.name}</div>
				<div class="exam_info">【有效时间】：${ct.startTime} - ${ct.endTime}</div>
				<div class="exam_info">【选择题数】：${ct.chooseCount}道题</div>
				<div class="exam_info">【判断题数】：${ct.opinionCount}道题</div>
				<div class="exam_info">【编程与简答题数】：${ct.programCount}道题</div>
				<div class="exam_info">【学习阶段】： ${zj.dagang.name}</div>
				<div class="exam_info">【章节】： 《${zj.name}》</div>
				<div class="exam_info">
					【派发部门】：
					<c:forEach items="${ct.cla}" var="c">
	   				${c.className}
	   			</c:forEach>

				</div>
				<div class="exam_info">【说明】：${empty ct.remark ? '无' : ct.remark}</div>
			</div>
		</fieldset>
		<div>
			<input type="hidden" id="zjid" value="${zj.id}" />
			<c:if test="${not empty choise.choises}">
			<fieldset
				style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
				<legend style="font-weight: bold; padding-bottom: 10px;">选择题(共${choise.choises.size()}题)</legend>
				<ol type="1" class="borderw" style="padding-left: 40px;">
					<c:forEach items="${choise.choises}" var="c" varStatus="status">
						<li class="li_question">
							<div class="question_title">
								${c.title}(选${c.answer.length()}项) <span class="correct_answer">
									<c:choose>
										<c:when
											test="${choise.choisesanswer[status.index].answer != c.answer}">
											<font color="red">${choise.choisesanswer[status.index].answer}</font>
										</c:when>
										<c:otherwise>	
										 				${choise.choisesanswer[status.index].answer}
										 		</c:otherwise>
									</c:choose>
								</span>
								<c:if
									test="${choise.choisesanswer[status.index].answer != c.answer}">
					 						 (正确答案：${c.answer})
								  			</c:if>
							</div>
							<ol type="A" style="padding-left: 0px;">
								<c:choose>
									<c:when test="${c.answer.length() == 1}">
										<input type="hidden" name="answercid" value="${c.id }" />
										<li>${c.optionA}</li>
										<li>${c.optionB}</li>
										<li>${c.optionC}</li>
										<li>${c.optionD}</li>
									</c:when>
									<c:otherwise>
										<input type="hidden" name="answercid" value="${c.id }" />
										<li>${c.optionA}</li>
										<li>${c.optionB}</li>
										<li>${c.optionC}</li>
										<li>${c.optionD}</li>
									</c:otherwise>
								</c:choose>

							</ol>
						</li>
					</c:forEach>
				</ol>
			</fieldset>
			</c:if>
			<c:if test="${not empty opinion.opinions}">
			<fieldset
				style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
				<legend style="font-weight: bold; padding-bottom: 10px;"">判断题(共${opinion.opinions.size()}题)</legend>
				<ol type="1" class="borderw" style="padding-left: 40px;">
					<c:forEach items="${opinion.opinions}" var="o" varStatus="status">
						<li class="li_question">
							<div class="question_title">
								<input type="hidden" name="answeroid" value="${o.id }" /> <label>
									${o.title} <c:choose>
										<c:when
											test="${opinion.opinionsanswer[status.index].answer != o.answer}">
											<span class="correct_answer"> <font color="red">${opinion.opinionsanswer[status.index].answer}</font>
											</span>
										</c:when>
										<c:otherwise>
											<span class="correct_answer">${opinion.opinionsanswer[status.index].answer}</span>
										</c:otherwise>
									</c:choose> <c:if
										test="${opinion.opinionsanswer[status.index].answer != o.answer}">
					 						 (正确答案：${o.answer})
								  			</c:if>
							</div>
						</li>
					</c:forEach>
				</ol>
			</fieldset>
			</c:if>
			<c:if test="${not empty program.programs}">
			<fieldset
				style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
				<legend style="font-weight: bold; padding-bottom: 10px;"">编程题(共${program.programs.size()}题)</legend>
				<ol type="1" class="borderw" style="padding-left: 40px;">
					<c:forEach items="${program.programs}" var="p" varStatus="status">
						<li class="li_question"><input type="hidden" name="answerpid"
							value="${p.id }" />
							<div class="question_title">
								<a name="m648"></a> <pre>${p.title}</pre>
							</div>
							<div>
								<pre>${program.programsanswer[status.index].answer}</pre>
							</div></li>
					</c:forEach>
				</ol>
			</fieldset>
			</c:if>
		</div>
	</div>
</div>
<script type="text/javascript" src="public/js/marking_homework.js"></script>

